package PTA2.ti33;

import java.util.Scanner;

/**
 * @author Lenovo
 */
public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int a = scanner.nextInt();
        int b = scanner.nextInt();
        int c = scanner.nextInt();
        int d = scanner.nextInt();
        int distance=(int)Math.abs(a-c)+(int)Math.abs(b-d);
        System.out.println(distance);
        scanner.close();
    }
}
